<%@ page contentType="text/html;charset=UTF-8"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>表达式列表</title>
		<link type="text/css" rel="stylesheet" href="themes/style.css" />
		<script type="text/javascript" src="./dynatable.js"></script>
		<script type="text/javascript">
			tableId = 'expressionTableBody';
			//新建表达式
			function addExpression(){
				addRow(["",""]);
			}
			//初始化表达式列表
			function initExpressionTable(){
				if(dialogArguments){
					for(var i in dialogArguments){
						addRow([dialogArguments[i][0],dialogArguments[i][1]]);
					}
				}else{//默认初始化一行
					addRow(["",""]);
				}
			};
			window.attachEvent("onload",initExpressionTable);
			//保存表达式
			function saveExpression(){
				var	valueArray = getRowValues();
				window.returnValue = valueArray;
				window.close();
			}
		</script>
	</head>
	<body class="rtm_body" scroll="no">
		<div class="rtm_hdr" style="margin-left: 0px">
			表达式管理(点击表达式单元格进行编辑)
		</div>
		<div class="rtm_tb">
			<table width="*" cellpadding="0" cellspacing="0" >
				<tr>
					<td class="rtm_tb_f" id="promptInfo" width="300px" style="font-weight: bold">
						请点击要编辑的表达式所在单元格进行编辑
					</td>
					<td class="rtm_tb_f" style="width: 45%">
						&nbsp;
					</td>
					<td class="rtm_tb_f" onclick="addExpression();" >
						<img src="themes/ico_add.gif" class="rtm_lsimg" title="新建表达式">
						新建
					</td>
					<td class="rtm_tb_c">
						<br>
					</td>
					<td class="rtm_tb_i" onclick="saveExpression();">
						<img src="themes/ico_save.gif" class="rtm_lsimg" title="保存表达式">
						保存&nbsp;
					</td>
				</tr>
			</table>
		</div>
		<div style="height:150px;">
		<table width="916" cellpadding="0" cellspacing="1" style="min-height:300px "
			class="dg_borderstyle" id="expressionTable">
			<thead>
				<tr id="headerRow">
					<td width="30" class="dg_headerstyle">
						优先级
					</td>
					<td width="169" class="dg_headerstyle">
						条件表达式
					</td>
					<td width="125" class="dg_headerstyle">
						运算表达式
					</td>
					<td width="172" class="dg_headerstyle">
						表达式调整
					</td>
				</tr>
			</thead>
			<tbody id='expressionTableBody' >
			</tbody>
		</table>
		</div>
	</body>
</html>
